<?php

header('Access-Control-Allow-Origin: *');
	$db=mysqli_connect('127.0.0.1','root','','yltravel');
	//判断否连接成功
	if(!mysqli_connect_errno($db)){
		//连接成功
		mysqli_query($db, 'SET NAMES UTF8');
				
		$count=$_GET['count'];	
		
		$sql="SELECT * FROM yzmtable  WHERE count= '$count'";
		 // 执行语句
		$result = mysqli_query($db,$sql);
		if (mysqli_affected_rows($db)) {
				// 声明一个数组
				 $arr = [];
				while ($row = mysqli_fetch_array($result)) {
					array_push($arr, $row);
				}
				// 返回数据
				echo json_encode(['code'=>1,'data'=>$arr]);

			}
		
	}
	else{
		echo "连接失败";
	}


?>